/************************************************************************
                        Course.h.h - Copyright asaf
**************************************************************************/


#ifndef COURSE_H
#define COURSE_H
#include "../Shered/Object.h"
#include <string>
//#include <list>
#include <algorithm>
using namespace std;
/**
  * class Course
  * basic academic course data
  */
class Course : virtual public Object
{
public:
		// Constructors/Destructors
		//default ctor
		Course(string ID="",string CourseName="",int semester=0):m_ID(ID),m_CourseName(CourseName),m_semester(semester){;}
		//comparison operator by main key
		bool operator==(const Course &rhs){return (m_ID==rhs.m_ID);};
     	//copy ctor
		Course(const Course &c):m_ID(c.m_ID),m_CourseName(c.m_CourseName),m_semester(c.m_semester){}
		//copy operator
		Course &operator=(const Course &rhs);
		//Empty Destructor
		virtual ~Course ();

		//getters/setters
		string getID ();
		string getCourseName();
		void setSemester(int new_var){m_semester=new_var;}
		int getSemester(){return m_semester;}
		const int getSemester()const{return m_semester;}

		//string basic reprasent for debug
		string toString(){return m_ID+" "+m_CourseName;}

		//predict used for stl list sort
		static bool sortPredicateBySemester(const Course &lhs,const Course &rhs){return (lhs.m_semester<rhs.m_semester);}

		

private:
		//course ID, the main key
		string m_ID;
		//course name
		string m_CourseName;
		//course semester
		int m_semester;
		
};
	
#endif // COURSE_H
